import 'package:multi_shop/models/merchant.dart';
import 'package:multi_shop/network/api_client.dart';

import '../network/api_routes.dart';

class MerchantApi {
  final _http = HttpClient();

  //  获取商家信息
  Future<MallMerchant> getMerchantInfo(int merchantId) async {
    final res = await _http.getJson(
      ApiRoutes.merchantInfo,
      query: {"id": merchantId},
      convert: (data) {
        return data["data"];
      },
    );
    return MallMerchant.fromJson(res);
  }
}
